/*     */ package com.iris.egrant.web.struts2.tags;
/*     */ 
/*     */ import freemarker.template.Configuration;
/*     */ import freemarker.template.Template;
/*     */ import java.io.Writer;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ import javax.servlet.jsp.JspException;
/*     */ import javax.servlet.jsp.tagext.BodyTagSupport;
/*     */ import org.springframework.web.context.WebApplicationContext;
/*     */ import org.springframework.web.context.support.WebApplicationContextUtils;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class ProgressBarTag
/*     */   extends BodyTagSupport
/*     */ {
/*     */   private static final long serialVersionUID = 1077194066541229822L;
/*  25 */   private String id = "";
/*     */ 
/*     */   
/*  28 */   private String isShowText = "true";
/*     */   
/*  30 */   private float percent = 0.0F;
/*     */   
/*  32 */   private float currVal = 0.0F;
/*     */   
/*  34 */   private float maxVal = 0.0F;
/*     */   
/*     */   public float getPercent() {
/*  37 */     return this.percent;
/*     */   }
/*     */   
/*     */   public void setPercent(float percent) {
/*  41 */     this.percent = percent;
/*     */   }
/*     */   
/*     */   public float getCurrVal() {
/*  45 */     return this.currVal;
/*     */   }
/*     */   
/*     */   public void setCurrVal(float currVal) {
/*  49 */     this.currVal = currVal;
/*     */   }
/*     */   
/*     */   public float getMaxVal() {
/*  53 */     return this.maxVal;
/*     */   }
/*     */   
/*     */   public void setMaxVal(float maxVal) {
/*  57 */     this.maxVal = maxVal;
/*     */   }
/*     */ 
/*     */   
/*     */   public String getId() {
/*  62 */     return this.id;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setId(String id) {
/*  67 */     this.id = id;
/*     */   }
/*     */   
/*     */   public String getIsShowText() {
/*  71 */     return this.isShowText;
/*     */   }
/*     */   
/*     */   public void setIsShowText(String isShowText) {
/*  75 */     this.isShowText = isShowText;
/*     */   }
/*     */ 
/*     */   
/*     */   public int doStartTag() throws JspException {
/*  80 */     WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(this.pageContext.getServletContext());
/*     */ 
/*     */     
/*  83 */     Configuration cptFreemarkereConfiguration = (Configuration)ctx.getBean("cptFreemarkereConfiguration");
/*     */     try {
/*  85 */       String res = (String)this.pageContext.getAttribute("res");
/*  86 */       Map<String, Object> rootMap = new HashMap<String, Object>();
/*  87 */       rootMap.put("res", res);
/*  88 */       rootMap.put("id", this.id);
/*  89 */       rootMap.put("isShowText", this.isShowText);
/*  90 */       rootMap.put("percent", Float.valueOf(this.percent));
/*  91 */       rootMap.put("currVal", Float.valueOf(this.currVal));
/*  92 */       rootMap.put("maxVal", Float.valueOf(this.maxVal));
/*     */       
/*  94 */       Template template = cptFreemarkereConfiguration.getTemplate("progressBar.ftl", "utf-8");
/*     */       
/*  96 */       template.process(rootMap, (Writer)this.pageContext.getOut());
/*     */     }
/*  98 */     catch (Exception e) {
/*  99 */       throw new JspException(e);
/*     */     } 
/*     */     
/* 102 */     return 0;
/*     */   }
/*     */ }


/* Location:              D:\文件kjt\WEB-INF\lib\egrant-core-2.2.20240205.1659.jar!\com\iris\egrant\web\struts2\tags\ProgressBarTag.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.1.3
 */